Repository navigation
fix(opencode-claimant): count claimant roots only toward the session cap (#5016) - #10733
Conversation
…cap (#5016) Ruling session-cap-5016: the concurrency cap is the claimant's launch budget. Scheduled fleet sessions (lane runners, the claimant's own fire, sweeps, the conductor) are infrastructure outside it; only claimant work roots consume slots. A server-active root whose clock has not moved for ACTIVE_SET_STALE_MS (2 h) is a zombie (#5016's ~18 h session) and releases its slot. - poll.py: is_scheduled_session / is_claimant_root_session, count_active_claimant_roots, staleness bound on active-set members; summarize_cap and get_active_root_session_count count claimant roots. - claimant.py: cap_step's counter delegates to the claimant count. - test_poll.py: TestClaimantCapAccounting (census-mix oracle from #5016, scheduled-population invariant sweep, staleness boundary). - prompt.md/README.md: the cap's meaning stated as claimant roots only. Cap value unchanged (36; raised from 12 to 20 to 36 on 2026-11-05).
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 20 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Fixes #5016. Implements ruling
session-cap-5016(recorded 2026-11-16T02:00:33-06:00 via orchestrator-audit-2026-11-16; agent note 6911818474 on #5016).What changes
The claimant concurrency cap is the claimant's launch budget: only claimant work roots consume slots. Scheduled fleet sessions — lane runners (
Queue lane (scheduled) - ...), the claimant's own fire (Opencode lane claimant/executor - ...), sweeps and the conductor — are infrastructure outside the cap. They all carrymetadata.openchamber.kind == "scheduled"on the OpenCode session (verified live 2026-11-16 across 366 roots); title prefixes are the fallback for legacy rows.A server-active root whose
time.updatedhas not moved forACTIVE_SET_STALE_MS(2 h) is a zombie — #5016's ~18 h session — and releases its slot. Releasing a slot only changes cap accounting; it never kills a session.pm-stack/opencode-claimant/poll.py:is_scheduled_session,is_claimant_root_session,count_active_claimant_roots; staleness bound applied to active-set members in_active_root_state;summarize_cap/get_active_root_session_countcount claimant roots.pm-stack/opencode-claimant/claimant.py:cap_step's counter delegates to the claimant count (same poll.py function).pm-stack/opencode-claimant/test_poll.py:TestClaimantCapAccounting— oracle is the opencode-claimant: the 12-session cap is consumed by lane runners, the claimant itself and an 18h zombie session — so 44 eligible candidates never launch #5016 census table (11 lane runners + claimant fire + 1 running work session + 18 h zombie → claimant count 1, not 14), an invariant sweep that 0..40 lane runners never change headroom, and the 2 h staleness boundary.prompt.md/README.md: cap semantics stated as claimant roots only.Cap value unchanged (36; raised 12 → 20 → 36 on 2026-11-05). No scheduler/cadence changes.
Verification
cd pm-stack/opencode-claimant && python3 -I run_hermetic_tests.py→Ran 124 tests ... OKLive read-only check against the laptop server 2026-11-16: 22 active roots of which only 4 are claimant roots; old accounting
cap_room14, newcap_room32.Sibling task 17446 (#3418, budget-aware claiming) is untouched.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.